package cn.com.open.itembank.dto;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 组卷模型
 * Created by lucky on 2018/3/14.
 */
public class ComposePaper {
    public ComposePaper() {
        this.forChooseQuestionList = null;
        this.mandatoryQuestionList = null;
        this.ruleSaveModel = null;
        this.questionIdListByTypeAndCategories = null;
        this.questionTypes = null;
        this.mutexQuestions = null;
    }

    private List<RuleQuestionModel> forChooseQuestionList;

    private List<RuleQuestionModel> mandatoryQuestionList;

    private RuleSaveModel ruleSaveModel;

    private Map<String, List<String>> questionIdListByTypeAndCategories;

    private List<QuestionTypeManageDto> questionTypes;

    private Map<String, List<String>> mutexQuestions;

    /**
     * Gets for choose question list.
     *
     * @return the for choose question list
     */
    public List<RuleQuestionModel> getForChooseQuestionList() {
        if (forChooseQuestionList == null) {
            forChooseQuestionList = new ArrayList<>();
        }
        return forChooseQuestionList;
    }

    /**
     * Gets mandatory question list.
     *
     * @return the mandatory question list
     */
    public List<RuleQuestionModel> getMandatoryQuestionList() {
        if (mandatoryQuestionList == null) {
            mandatoryQuestionList = new ArrayList<>();
        }
        return mandatoryQuestionList;
    }

    /**
     * Gets rule save model.
     *
     * @return the rule save model
     */
    public RuleSaveModel getRuleSaveModel() {
        return ruleSaveModel;
    }

    /**
     * Sets rule save model.
     *
     * @param ruleSaveModel the rule save model
     */
    public void setRuleSaveModel(RuleSaveModel ruleSaveModel) {
        this.ruleSaveModel = ruleSaveModel;
    }

    /**
     * Gets question id list by type and categories.
     *
     * @return the question id list by type and categories
     */
    public Map<String, List<String>> getQuestionIdListByTypeAndCategories() {
        if (questionIdListByTypeAndCategories == null) {
            questionIdListByTypeAndCategories = new HashMap<>();
        }
        return questionIdListByTypeAndCategories;
    }

    /**
     * Gets question types.
     *
     * @return the question types
     */
    public List<QuestionTypeManageDto> getQuestionTypes() {
        if (questionTypes == null) {
            questionTypes = new ArrayList<>();
        }
        return questionTypes;
    }

    /**
     * Gets mutex questions.
     *
     * @return the mutex questions
     */
    public Map<String, List<String>> getMutexQuestions() {
        if (mutexQuestions == null) {
            mutexQuestions = new HashMap<>();
        }
        return mutexQuestions;
    }
}
